1. Field of the Invention
The present invention relates to a disk drive comprising a disk medium on which data is recorded, and in particular, to a method and apparatus favorably used to rewrite a program executed in the disk drive.
2. Description of the Related Art
A disk drive comprises a disk medium on which data is recorded. The disk drive is typically connected to a host system that utilizes this drive. The host system is electronic equipment utilizing the disk drive as auxiliary storage (mass storage) and represented by a personal computer. The disk drive executes various processes including recording of data on the disk medium and reading of data from the medium. These processes are implemented by allowing a CPU provided in the disk drive to execute a predetermined program (control program). This program is generally stored in a nonvolatile memory provided in the disk drive.
There has been a growing demand for a disk drive that can rewrite the program stored in the nonvolatile memory. Recent disk drives thus use a rewritable nonvolatile memory to store the program (refer to, for example, Jpn. Pat. Appln. KOKAI Publication No. 2000-99270). Such a nonvolatile memory is, for example, a flash ROM (Read Only Memory).
In general, to rewrite the program stored in the rewritable nonvolatile memory in the disk drive, the host system executes the procedure described below. First, the host system executes a command to transfer a new program to the disk drive. Subsequently, the host system executes a command to write the program transferred to the disk drive to the nonvolatile memory. That is, immediately after transferring the new program to be rewritten to the disk drive, the host system writes the program to the nonvolatile memory. Thus, the program stored in the nonvolatile memory is changed to the new program. In this state, the host system executes a command to reactivate the rewritten program. That is, the host system reactivates the entire system immediately after the program has been rewritten.
To safely rewrite the program stored in the nonvolatile memory in the disk drive, it is necessary to establish the following condition: while the program is being rewritten, the host system accesses the disk drive only for the purpose of rewriting the program. However, if the host system is a personal computer, the computer generally has a multitasking function of concurrently executing a plurality of tasks (programs). It is dangerous to rewrite the program stored in the nonvolatile memory in the disk drive in the environment in which a plurality of tasks are concurrently executed.
In the prior art, the method described below is thus used to reactivate the entire system after the program has been rewritten and to prevent the host system from accessing the disk drive while the program is being rewritten. First, a floppy disk is provided in which a boot program and an application program for rewriting the program are stored. The boot program has the minimum required boot function. The application program is compatible with the architecture of the host system (computer architecture). This floppy disk is installed in a floppy disk drive in the host system. In this state, the host system executes the application program on the floppy disk to rewrite the program stored in the nonvolatile memory in the disk drive according to the above described procedure.
However, in the above described conventional technique, the program rewriting procedure is disadvantageously complicated. Further, the host system, having any of various architectures, must be provided with a program rewriting application program characteristic of the system. In particular, the disk drive has hitherto been used in fields other than personal computers, such as mass storage for a car navigation apparatus and mass storage for an audiovisual (AV) apparatus. That is, the host system utilizing the disk drive is not necessarily a host system computer (host computer). Further, various architectures are applied to the host system. Thus, the above problem is marked.
Furthermore, with the above described conventional technique, the entire system must be reactivated immediately after the program has been rewritten. It is thus difficult to run the program rewriting application program on an ordinary operating system. Accordingly, with the conventional technique, the program rewriting application program is executed using the floppy disk on which the boot program is stored and without relying on the operating system. However, all recent host systems utilizing a disk drive do not have a floppy disk drive. It is therefore difficult to rewrite the program executed on the disk drive utilized by a host system that does not have a floppy disk drive.